﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SocialIn.Web.Worker
{
    public partial class UCMap : System.Web.UI.UserControl
    {
        private string level = "2";
        private string mapX = "";
        private string mapY = "";
        private string width = "400";
        private string height = "400";
        private string pan = "10";
        private string tilt = "-30";

        public string Level 
        {
            get
            {
                return level;
            }
            set
            {
                level = value;
            }
        }
        public string MapKey { get; set; }
        public string Width 
        {
            get
            {
                return width;
            }
            set
            {
                width = value;
            }
        }
        public string Height 
        { 
            get
            {
                return height;
            }
            set
            {
                height = value;
            }
        }
        public string MapX 
        {
            get
            {
                return mapX;
            }
            set
            {
                mapX = value;
            }
        }
        public string MapY 
        {
            get
            {
                return mapY;
            }
            set
            {
                mapY = value;
            }
        }

        public string Position
        {
            get
            {
                if (string.IsNullOrEmpty(mapX) || string.IsNullOrEmpty(mapY))
                    return "37.529196714213114, 126.92506196011036";
                else
                    return mapX + "," + mapY;
            }
        }
        public string Pan 
        {
            get
            {
                return pan;
            }
            set
            {
                pan = value;
            }
        }
        public string Tilt 
        {
            get
            {
                return tilt;
            }
            set
            {
                tilt = value;
            }
        }


        protected override void OnInit(EventArgs e)
        {
            //Level = "2";
            MapKey = System.Configuration.ConfigurationManager.AppSettings["MapKey"];
            //Width = "400";
            //Height = "400";
            //MapX = "";
            //MapY = "";
            //Pan = "10";
            //Tilt = "-30";

            base.OnInit(e);
        }

        protected void Page_Load(object sender, EventArgs e)
        {            
        }        
    }
}